package com.sfdk.admin.data.resourceEditor
{
    import com.sfdk.io.GenericIO;

    import flash.display.BitmapData;
    import flash.events.EventDispatcher;

    [Bindable]
    public class ResourceElement extends GenericIO
    {
        private var _fullName:String;
        private var _type:String;

        public function ResourceElement(currentDirectory:String = null, filePath:String = null)
        {
            _fullName = filePath;
            var pathArray:Array = filePath.split("/");
            _type = pathArray[pathArray.length - 2];
            _elementName = pathArray[pathArray.length - 1];

            super(currentDirectory + filePath, GenericIO.BITMAP_FILE);
        }

        private var _elementName : String;

        private var _elementDescription : String;

        private var _elementPercent : int;

        private var _elementStatus : ElementStatus;

        private var _elementBitmapData : BitmapData;

        public function get elementName():String {
            return _elementName;
        }

        public function set elementName(value:String):void {
            _elementName = value;
        }

        public function get elementDescription():String {
            return _elementDescription;
        }

        public function set elementDescription(value:String):void {
            _elementDescription = value;
        }

        public function get elementPercent():int {
            return _elementPercent;
        }

        public function set elementPercent(value:int):void {
            _elementPercent = value;
        }

        public function get elementStatus():ElementStatus {
            return _elementStatus;
        }

        public function set elementStatus(value:ElementStatus):void {
            _elementStatus = value;
        }

        public function get elementBitmapData():BitmapData {
            return _elementBitmapData;
        }

        public function set elementBitmapData(value:BitmapData):void {
            _elementBitmapData = value;
        }


        override protected function init():void {
            super.init();
            _elementBitmapData = _imageData;
        }
    }
}
